{% extends "base.html" %}

{% block title %}
{{ current_user.name }} Todo List
{% endblock %}

{% block user %}
{{ current_user.name }}
{% endblock %}




{% block content %}
<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            {% include 'flash_message.html' %}
        </div>

        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <table class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th>任务</th>
                        <th>创建时间</th>
                        <th style="text-align: center;">恢复</th>
                    </tr>
                </thead>
                <tbody>
                    {% for todo in todos%}

                    <tr class="{{ todo[4] }}" {% if todo[3] %} style="text-decoration: line-through" {% endif %}>
                        <td>{{ todo[1] }}</td>
                        <td>{{ todo[2] }}</td>
                        <td style="text-align: center;">
                            <a href="{{ url_for('bp_todo.delete', todoid=todo[0]) }}">
                                <span class="glyphicon glyphicon-repeat" aria-hidden="true"></span>
                            </a>
                        </td>
                    </tr>
                    {% endfor %}

                </tbody>
            </table>
        </div>
    </div>


</div>
{% endblock %}